<%@ page import="java.util.Map" %>
<%@ page import="java.util.HashMap" %><%--
  Created by IntelliJ IDEA.
  User: zsh
  Date: 2020/9/10
  Time: 6:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    Map<String, String> map = new HashMap<String, String>();
    map.put("id", "1002");
    map.put("username", "张三");
    map.put("password", "123");
    map.put("email", "123.@qq.com");
    //必须放在域对象中map才能获取里面的属性
    pageContext.setAttribute("map",map);
%>
使用el：获取map中的数据{方式1}
id:${pageScope.map.id}<br>
username:${pageScope.map.username}<br>
password:${pageScope.map.password}<br>
pageContext:${pageScope.map.email}<br>

使用el：获取map中的数据{方式2}
id:${pageScope.map["id"]}<br>
username:${pageScope.map["username"]}<br>
password:${pageScope.map["password"]}<br>
email:${pageScope.map["email"]}<br>
</body>
</html>
